package br.com.cefetrn.apoena.view.decorators;

import org.displaytag.exception.DecoratorException;

import br.com.cefetrn.apoena.dominio.entity.Evento;

/**
 * @author root
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class LinkEvento extends AbstractColumn {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.displaytag.decorator.ColumnDecorator#decorate(java.lang.Object)
	 */
	public String decorate(Object obj) throws DecoratorException {
		String link = "";
		Integer e = null;
		System.out.println(obj);
		if (obj != null){
			e = (Integer) obj;
			link = "<a href=\"/APOENA/evento.action?tipo=BUSCA&botao=buscar&codEventoBuscado="+e+"\">Visualizar</a>";
		}
		return link;
	}
}
